﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Sport_Shop.DAL;

namespace Sport_Shop
{
    public partial class Giohang : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
                load_ListSanpham();
        }

        private void load_ListSanpham()
        {
            DataAccess da = new DataAccess();
            string sql = "SELECT TenMon, CTHD.SL, ThanhTien FROM CTHD, MONAN WHERE CTHD.MaMon = MONAN.MaMon";
            GVListSanpham.DataSource = da.GetDataTable(sql);
            GVListSanpham.DataBind();
        }
    }
}